package org.bugeden.netdisk.vfs

import org.bugeden.netdisk.transfer.Block

/**
 * Created by IntelliJ IDEA.
 * User: gzhang
 * Date: 2010-6-18
 * Time: 0:28:53
 * To change this template use INetFile | Settings | INetFile Templates.
 */

trait INetFile {
  def parent(): INetFile

  def child(): INetFile

  def isDirectory(): Boolean

  def isFile(): Boolean

  def absolutePath(): String

  def simplePath(): String

  def name(): String

  def mkdir(): Boolean

  def mkdirs(): Boolean

  def space(): Int

  def setLastModified(timestamp: Long): Unit

  def lastModified(): Long

  def setReadOnly(): Unit

  def readOnly(): Boolean

  def setWritable(): Unit

  def writable(): Boolean

  def list(): Array[String]

  def listFile(): Array[INetFile]

  def isChild(INetFile: INetFile): Boolean

  def isChild(INetFileName: String): Boolean

  def isParent(INetFile: INetFile): Boolean

  def isParent(INetFileName: String): Boolean

  def setGroup(grp: String): Unit

  def group(): String

  def blocks(): Array[Block]

  def persist(): Boolean
}
